<?php
include 'redir.php';
require_once '/model/LoginContext.php';
error_reporting(E_ALL);

$action = isset($_REQUEST['login']) ? $_REQUEST['login'] : 0;

$userContext=new LoginContext();
$user=UsersQuery::getEmptyRecord();
$user['login']=$_REQUEST['login'];
$user['password']=$_REQUEST['password'];

$zalogowany=$userContext->Select($user);
if(isset ($zalogowany)){
$_SESSION['UserAccess']=$zalogowany;

}
header("Location: index.php");
?>
